# !/usr/bin/env python
# File       : config.py
# Time       : 2022/8/29 15:10
# Author     : hyx
# -*- coding:utf-8 -*-
import os
import secrets

USERNAME = '47_97_155_243'
PASSWORD = 'ss4KrHkr6eBiRMsY'
PORT = 3306
HOST = '127.0.0.1'
DATABASE = '47_97_155_243'

SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://{}:{}@{}:{}/{}?charset=utf8'.format(USERNAME,PASSWORD,HOST,PORT,DATABASE)
SQLALCHEMY_TRACK_MODIFICATIONS = True



# 密钥
SECRET_KEY = secrets.token_hex()

# 邮箱配置
# MAIL_SERVER = 'smtp.163.com'
MAIL_SERVER = 'smtp.sina.com'
# MAIL_PORT = 25
MAIL_PORT = 465
MAIL_USE_TLS = False
MAIL_USE_SSL = True
MAIL_DEBUG =True
MAIL_USERNAME= 'hyx1429940482@sina.com'
MAIL_PASSWORD = 'd88a877639683241'
MAIL_DEFAULT_SENDER = 'hyx1429940482@sina.com'

# 静态文件的目录
UPLOAD_FOLDER = os.getcwd()+'/static'       #'/path/to/the/uploads'
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg'}